For Problem 1

For Problem 2

For Problem 3